// SPDX-License-Identifier: GPL-2.0
/*
 * Lombo remote controller keymaps
 *
 * Copyright (C) 2016-2019, LomboTech Co.Ltd.
 * Author: lomboswer <lomboswer@lombotech.com>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 */

#include <linux/module.h>
#include <media/rc-map.h>
#include "../lombo/ir.h"

static struct rc_map_table lombo_ir_table[] = {
	{ 0x45, KEY_1 },
	{ 0x46, KEY_2 },
	{ 0x47, KEY_3 },
	{ 0x44, KEY_4 },
	{ 0x40, KEY_5 },
	{ 0x43, KEY_6 },
	{ 0x07, KEY_7 },
	{ 0x15, KEY_8 },
	{ 0x09, KEY_9 },
	{ 0x19, KEY_0 },
	{ 0x16, KEY_KPASTERISK },
	{ 0x0d, KEY_NUMERIC_POUND },
	{ 0x1c, KEY_OK },
	{ 0x18, KEY_UP },
	{ 0x52, KEY_DOWN },
	{ 0x08, KEY_LEFT },
	{ 0x5a, KEY_RIGHT },
};

static struct rc_map_list lombo_map = {
	.map = {
		.scan = lombo_ir_table,
		.size = ARRAY_SIZE(lombo_ir_table),
		.rc_proto = RC_PROTO_NEC,
		.name = RC_MAP_LOMBO,
	}
};

static int __init init_rc_map_lombo(void)
{
	return rc_map_register(&lombo_map);
}

static void __exit exit_rc_map_lombo(void)
{
	rc_map_unregister(&lombo_map);
}

module_init(init_rc_map_lombo)
module_exit(exit_rc_map_lombo)

MODULE_AUTHOR("lombotech lomboswer");
MODULE_LICENSE("GPL");

